/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "mixins/blue";

$layout-modal-bg:                   $ic-color-light;
$layout-modal-font-color:           $ic-font-color-dark;

body {
  min-height: 100vh;
  background: $ic-color-light;
  font-weight: 300;

  &:not(.is-inside-submission-frame),
  &:not(.embedded) {
    min-width: 768px;
  }

  &.no-headers, &.embedded {
    #header, #topbar, #left-side, #breadcrumbs { display: none !important; }
    .ic-app-nav-toggle-and-crumbs { display: none; }
    #footer { display: none; }
  }
  &.embedded {
    #application {
      height: 100%;
    }
    h2, .h2 {
      @include ui-widget-header-bg-and-text;
      @include fontSize($ic-font-size--small);
      font-weight: bold;
      margin: (-0.95em) -0.95em 1em;
      padding: 0.4em 1em;
      line-height: 20px;
    }
    &.no-headers {
      h2, .h2 {
        display: none;
      }
    }
    #modal-box {
      background: $layout-modal-bg !important;
      color: $layout-modal-font-color !important;
      height: auto !important;
    }
  }
}

// **********************************************************************************
// all of the following are classes that should be applied to 'body' when appropriate

.with-left-side {
  #left-side {
    display: block;
    overflow: visible;
    /* #main has a z-index: 10 on it. This is needed so that group set names will appear above the main content */
    z-index: 11;
  }
}

.with-right-side {
  #right-side-wrapper {
    display: block;
  }
}

// **********************************************************************************
// end classes applied to body

#footer {
  .footer-logo {
    @include bg-image("footer-logo", "png", no-repeat, left, top, transparent, 114px, 10px);
    display: inline-block;
    height: 10px;
    margin: 0 20px 0 0;
    width: 114px;
  }
}

div.content_notice {
  margin: 12px;
  margin-bottom: 6px;
  div {
    display: inline-block;
  }
  i {
    padding-right: 8px;
  }
}

.tool_content_wrapper.custom_height[style] {
  height: 100% !important;
}

.before_external_content_info_alert,
.after_external_content_info_alert {
  margin: 20px 0px 20px 0px;
  &:focus {
    outline: none;
  }
}

iframe.info_alert_outline {
  border: 2px solid #008EE2 !important;
}

iframe.tool_launch {
  min-height: 450px;
  width: 100%;
  height: 100%;
  border: none;
}

#skip_navigation_link {
  @include accessibility-prompt;
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  &:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    z-index: 1;
    outline: none;
    & + .ic-app-header__main-navigation {
      margin-top: 50px;
    }
  }
}
